package no.ntnu.fp.server;

import java.io.DataOutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.InetAddress;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

import no.ntnu.fp.net.co.Connection;
import no.ntnu.fp.net.co.NaturalJoin;

public class ServerTest {
	
	
	public static void main(String[] args) throws InterruptedException {
		new Server();
		
		Thread.sleep(2000);
		
		try {
			Socket c = new Socket(InetAddress.getLocalHost(),1502);
			DataOutputStream out = new DataOutputStream(c.getOutputStream());
			
			String s = ("It's a man's obligation to stick his " +
			  		"boneration in a women's separation; this sort of " +
			  		"penetration will increase the population of the younger generation.");
		
			System.out.println("Printing so server");
			out.writeBytes(s + "\n");
		} 
		catch (SocketTimeoutException e) {}
		catch (UnknownHostException e) {} 
		catch (IOException e) {}	
	}
	

}
